package com.me.exbean.util;

import com.lcx.annotation.IOCValue;
import com.lcx.annotation.JsObject;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;

@IOCValue
@JsObject("dropper.html")
public class ImageUtil {

    @JsObject
    public double[] getImageSize(String path) throws Exception{
        BufferedImage bi = ImageIO.read(new File(path));
        double d[] = new double[2];
        d[0]=bi.getWidth();
        d[1]=bi.getHeight();
        return d;
    }

}
